export default {
  cartProducts (state) {
    return state.cart.added.map(({id, quantity}) => {
      const {title, price} = state.products.all.find(p => p.id === id)
      return {
        ...{id, quantity},
        ...{title, price}

      }
    })
  }
}
